
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE PROCEDURE [dbo].gspSiteUserAccessRole_SEARCH
(
@roleId int = null,
@userId int = null,
@createDate datetime = null
)
AS

SELECT
  *
FROM
  [dbo].[SiteUser_AccessRole]
WHERE
  (@roleId IS NULL OR [RoleId] = @roleId)
AND
  (@userId IS NULL OR [UserId] = @userId)
AND
  (@createDate IS NULL OR [CreateDate] = @createDate)

GO
